import { axios } from '@/utils/request'

// 运费模版
export const getExpressTemplates = () => {
  return axios({
    url: '/express/templates',
    method: 'get'
  })
}

// 商品详情
export const getExpressDetails = (id) => {
  return axios({
    url: `/express/template/${id}`,
    method: 'get'
  })
}

// 新建商品
export const createExpressTemplate = (data) => {
  return axios({
    url: '/express/template',
    method: 'post',
    data
  })
}

// 更新商品
export const updateExpressTemplate = (id, data) => {
  return axios({
    url: `/express/template/${id}`,
    method: 'put',
    data
  })
}